package com.iocup.keybastion.exception;


import com.pine.sunflower.core.model.CommonErrorCode;

/**
 * 安全异常类
 *
 * @author xyjxust
 * @create 2021/11/24 10:16
 **/
public class SecurityException extends RuntimeException {

    protected String statusCode;

    public SecurityException(String statusCode, String message, Exception e) {
        super(message, e);
        this.statusCode = statusCode;
    }

    public SecurityException(String code, String message) {
        this(code, message, null);
    }

    public SecurityException(String message) {
        this(CommonErrorCode.SYSTEM_ERROR.getCode(), message, null);
    }

    public String getStatusCode() {
        return statusCode;
    }
}
